<?php
class Result{
  public $value;//位置
  public $queryText;//查出此位置的查询词
  public $rate;//查询词对于此位置对应的关键词的匹配度（用于查询结果按匹配度从高到低排序）

  public function __construct($value, $queryText, $rate) {
        $this->value = $value;
        $this->queryText = $queryText;
        $this->rate = $rate;
   }

   public function getValue(){
     return $this->value;
   }

   public function getQueryText(){
     return $this->queryText;
   }

   public function addQueryText($qt){
     return $this->queryText[$qt] = null;
   }

   public function getRate(){
     return $this->rate;
   }

   public function setRate($rate){
     $this->rate = $rate;
   }
}
?>
